//
// Created by wang on 2021/7/12.
//

#include "netutil.h"
#include "enet.h"
#include <arpa/inet.h>

uint32_t pil_inet_pton(int32_t f, char *str, void *buf) {

    if (NULL == str || NULL == buf)
        return ERR_PIL_INVALID_PARAMETERS;

    if (inet_pton(f, str, buf) <= 0)
        return ERR_PIL_PTON_FAILED;

    return ENET_RET_SUCCESS;
}
